package cn.ly.core.inclass;

import java.util.Scanner;

public class NoNameOuterClass {
	
	private String outName;
	private String input = "";
	public NoNameOuterClass(String name){
		this.outName = name;
	}
	
	
	
	public void startNewThread(){
		final int aaa = 0;
		int bbb = 1;
		new Thread(new Runnable(){//启动一个线程
			public void run() {
				while(!input.equals("-1"))
					System.out.println("start me is " + NoNameOuterClass.this.outName + " : 当前输入内容：" + input);
					System.out.println(aaa);
					try {
						Thread.sleep(1000*10);
					} catch (InterruptedException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
			}
		}).start();
		Scanner s = new Scanner(System.in);
		while( !(input = s.nextLine()).equals("-1") ){
			this.notifyAll();
		}
			
	}
	
	public static void main(String[] args) {
		new NoNameOuterClass("#1 NoNameOuter").startNewThread();
	}

}
